#pragma once
#include <map>
#include <set>
#include "Singleton.h"
#include "expire_def.h"

struct stOrder
{
    std::map<std::string, std::int64_t> bet_orders;
    std::map<std::string, std::int64_t> win_orders;
    std::map<std::string, std::string> cancle_orders;
    std::set<std::string> cancled_orders;
    std::int64_t bet_amount;
    std::int32_t bet_cnt;
    std::int64_t win_amount;
    std::int32_t win_cnt;
};

class OrderMgr
{
public:
    OrderMgr();
    virtual ~OrderMgr();

public:
    static OrderMgr* Instance()
	{
		return CSingleton<OrderMgr>::Instance();
	}

public:
    stOrder* Get(const std::string& cycle, bool force);

private:
    ExpireMgr<std::string, stOrder, 3600> m_mgr;
};










